package com.xiaoyu.base.utils;

public class ClassUtil {

    public static <T> Class<? extends T> getClassFromName(String className, Class<T> superClass) {
        Class<? extends T> activityClass = null;
        try {
            return Class.forName(className).asSubclass(superClass);
        } catch (ClassNotFoundException | ClassCastException e) {
            e.printStackTrace();
            return null;
        }
    }
}
